package com.javafive;

import java.io.FileInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;

public class Demo6 {
    public static void main(String[] args) throws Exception {
        String path="E:\\webWork\\javaKh62Demo\\src\\com\\javafive\\txt\\1.txt";
        InputStream inputStream = new FileInputStream(path);
        Reader reader = new InputStreamReader(inputStream,"UTF-8");
        char[] chars = new char[1024];
        int count1=-1;
        while ((count1=reader.read(chars)) !=-1){
        }
        for (int i = 0; i < chars.length; i++) {
            if(chars[i] !=' '){
                System.out.print(chars[i]);
            }
        }
    }
}
